- Two of the most useful shortcuts utilize the Fn (function) keys. It is therefore recommended that you enable the "Use all F1, F2, etc. keys as standard function keys" option [System Preferences > Keyboard].
- Be sure to enable the Mac OS X 10.5+ keymap in Android Studio [Preferences > Keymap].
- A fairly complete shortcut list can be found here.
Discover gists
version: "3" | |
services: | |
traefik: | |
image: traefik:v2.10 | |
container_name: 'traefik' | |
command: | |
- '--log.level=DEBUG' | |
- '--api.insecure=true' | |
- '--api.dashboard=true' |
How to fix a USB drive showing up as two drives (fragmented into multiple partitions) on Windows:
- Hold the Windows key and press X, select PowerShell (Admin), select Yes to the pop-up. You can also use Command Prompt.
- In the Powershell interface type
diskpart
to enter the disk partition tool. - Type
list disk
to see all disks listed. - Select the USB drive by typing
select disk [NUMBER]
. Be careful to select the correct drive. - Type
clean
. An error will occur if you have the drive folder open, close the window and repeat the command if this happens. - Type
create partition primary
. - Type
format fs=ntfs quick
to format the drive (you can also choose to setfs=fat32
). - Type
active
.
def on_received_number(receivedNumber): | |
basic.show_string("" + str((receivedNumber))) | |
radio.on_received_number(on_received_number) | |
radio.set_group(2) |
Please consider using http://lygia.xyz instead of copy/pasting this functions. It expand suport for voronoi, voronoise, fbm, noise, worley, noise, derivatives and much more, through simple file dependencies. Take a look to https://github.com/patriciogonzalezvivo/lygia/tree/main/generative
float rand(float n){return fract(sin(n) * 43758.5453123);}
float noise(float p){
float fl = floor(p);
float fc = fract(p);
This is a collection of coding patterns I have learned to solve not only some of the most common problems, but the 14 patterns (yes, there are way more than 14, but the point here is taking 6 months of preparation and condensing it into a 30 minute read that would not take more than 1-2 weeks to master. I have found these problems and patterns to be the most useful in that the data structures and algorithms are used in many other problems and become familiar over time. Good luck!
Please feel free to comment if you got some value or find any errors!
Thanks!
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8"> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0"> |
The set
lines
- These lines deliberately cause your script to fail. Wait, what? Believe me, this is a good thing.
- With these settings, certain common errors will cause the script to immediately fail, explicitly and loudly. Otherwise, you can get hidden bugs that are discovered only when they blow up in production.
set -euxo pipefail
is short for:
set -e
set -u
// Thanks to: https://gist.github.com/bennyhuo/af7c43cc4831661193605e124f539942 | |
val urlMappings = mapOf( | |
"https://dl.google.com/dl/android/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/", | |
"https://repo.maven.apache.org/maven2" to "https://mirrors.tencent.com/nexus/repository/maven-public/", | |
"https://plugins.gradle.org/m2" to "https://mirrors.tencent.com/nexus/repository/gradle-plugins/" | |
) | |
fun RepositoryHandler.mirroring() { | |
all { |
//camera-like projection matrix | |
var cameraData = new CameraDataForBurst(camera); | |
//or | |
//projection matrix for the rendering target of a given size | |
var cameraData = new CameraDataForBurst(camera, 320, 240); | |
var worldPoint = new float3(10, 10, 0); | |
var screenPointWithZ = cameraData.WorldToScreenPointWithZ(worldPoint); | |
var screenPoint = cameraData.WorldToScreenPoint(worldPoint); |